package cn.cxy.myapplication.annotation

import android.app.Activity

object InjectionUtil {
    fun setContentViewFor(obj: Any) {
        if (obj is Activity) {
            val contentResId = obj.javaClass.getAnnotation(ContentView::class.java)?.value
            if (contentResId != null && contentResId != 0) {
                obj.setContentView(contentResId)
            }
        }
    }
}